package org.eenie.core.ext

import android.content.Context
import android.content.Intent
import android.os.Bundle
import android.widget.Toast



var toast: Toast? = null




fun Context.toast(msg: String) {
    toast?.cancel()
    toast = Toast.makeText(this, msg, Toast.LENGTH_SHORT).also {
        it.show()
    }
}


fun Context.startTargetActivity(target: Class<*>, params: (Bundle.() -> Bundle)? = null) {
    startActivity(Intent(this, target))
}